package lgq.xuan.httprequest.util.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class PhoneHelper extends SQLiteOpenHelper {

    private static final String DB_NAME = "phone.db"; // 数据库名
    private static final int DB_VERSION = 1; // 数据库版本

    public PhoneHelper(@Nullable Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL(
                "create table phone(" +
                        "_id integer primary key autoincrement, " +
                        "uid integer, " +
                        "cloud_id integer, " +
                        "name text, " +
                        "called text, " +
                        "phone text," +
                        "isdelete integer default 0);"
        );
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
